.class public Lcom/xingbook/park/activity/HeadImageAct;
.super Lcom/xingbook/park/activity/BaseActivity;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Z

.field private b:Lcom/xingbook/ui/ad;

.field private c:Lcom/xingbook/ui/ad;

.field private d:Landroid/widget/ImageView;

.field private e:Z

.field private final f:Lcom/xingbook/park/activity/y;


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Lcom/xingbook/park/activity/BaseActivity;-><init>()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->a:Z

    new-instance v0, Lcom/xingbook/park/activity/y;

    invoke-direct {v0, p0}, Lcom/xingbook/park/activity/y;-><init>(Lcom/xingbook/park/activity/HeadImageAct;)V

    iput-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->f:Lcom/xingbook/park/activity/y;

    return-void
.end method

.method static synthetic a(Lcom/xingbook/park/activity/HeadImageAct;)Lcom/xingbook/park/activity/y;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->f:Lcom/xingbook/park/activity/y;

    return-object v0
.end method

.method private a(Landroid/net/Uri;)V
    .locals 6

    const/16 v5, 0x1e0

    const/4 v4, 0x1

    new-instance v0, Ljava/io/File;

    new-instance v1, Ljava/lang/StringBuilder;

    sget-object v2, Lcom/xingbook/c/c;->s:Ljava/lang/String;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "crop.jpg"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-static {v0}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object v0

    new-instance v1, Landroid/content/Intent;

    const-string v2, "com.android.camera.action.CROP"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v2, "image/*"

    invoke-virtual {v1, p1, v2}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;

    const-string v2, "crop"

    const-string v3, "true"

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v2, "aspectX"

    invoke-virtual {v1, v2, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string v2, "aspectY"

    invoke-virtual {v1, v2, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string v2, "outputX"

    invoke-virtual {v1, v2, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string v2, "outputY"

    invoke-virtual {v1, v2, v5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const-string v2, "output"

    invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    const-string v0, "scale"

    invoke-virtual {v1, v0, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string v0, "outputFormat"

    sget-object v2, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;

    invoke-virtual {v2}, Landroid/graphics/Bitmap$CompressFormat;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v0, "noFaceDetection"

    invoke-virtual {v1, v0, v4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const-string v0, "return-data"

    const/4 v2, 0x0

    invoke-virtual {v1, v0, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const/4 v0, 0x3

    invoke-virtual {p0, v1, v0}, Lcom/xingbook/park/activity/HeadImageAct;->startActivityForResult(Landroid/content/Intent;I)V

    return-void
.end method

.method private a(Z)V
    .locals 2

    iput-boolean p1, p0, Lcom/xingbook/park/activity/HeadImageAct;->a:Z

    if-eqz p1, :cond_0

    iget-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    const-string v1, "\u786e\u8ba4\u4f7f\u7528\u8fd9\u4e2a\u5934\u50cf"

    iput-object v1, v0, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    iget-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->c:Lcom/xingbook/ui/ad;

    const-string v1, "\u53d6\u6d88"

    iput-object v1, v0, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    :goto_0
    iget-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    invoke-virtual {v0}, Lcom/xingbook/ui/ad;->invalidate()V

    iget-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->c:Lcom/xingbook/ui/ad;

    invoke-virtual {v0}, Lcom/xingbook/ui/ad;->invalidate()V

    return-void

    :cond_0
    iget-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    const-string v1, "\u4ece\u76f8\u518c\u4e2d\u9009\u62e9\u7167\u7247"

    iput-object v1, v0, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    iget-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->c:Lcom/xingbook/ui/ad;

    const-string v1, "\u62cd\u6444\u7167\u7247"

    iput-object v1, v0, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    goto :goto_0
.end method

.method static synthetic b(Lcom/xingbook/park/activity/HeadImageAct;)Z
    .locals 1

    iget-boolean v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->e:Z

    return v0
.end method


# virtual methods
.method public e()Ljava/lang/String;
    .locals 2

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "\u8bbe\u7f6e\u5934\u50cf"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 5

    const/4 v4, 0x1

    invoke-super {p0, p1, p2, p3}, Lcom/xingbook/park/activity/BaseActivity;->onActivityResult(IILandroid/content/Intent;)V

    const/4 v0, -0x1

    if-ne p2, v0, :cond_0

    const/4 v0, 0x2

    if-ne p1, v0, :cond_1

    new-instance v0, Ljava/io/File;

    new-instance v1, Ljava/lang/StringBuilder;

    sget-object v2, Lcom/xingbook/c/c;->s:Ljava/lang/String;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "m.jpg"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-static {v0}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/xingbook/park/activity/HeadImageAct;->a(Landroid/net/Uri;)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    if-ne p1, v4, :cond_2

    if-eqz p3, :cond_0

    invoke-virtual {p3}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/xingbook/park/activity/HeadImageAct;->a(Landroid/net/Uri;)V

    goto :goto_0

    :cond_2
    const/4 v0, 0x3

    if-ne p1, v0, :cond_0

    if-eqz p3, :cond_0

    new-instance v1, Ljava/io/File;

    new-instance v0, Ljava/lang/StringBuilder;

    sget-object v2, Lcom/xingbook/c/c;->s:Ljava/lang/String;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "crop.jpg"

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    const/4 v0, 0x0

    :try_start_0
    invoke-virtual {p0}, Lcom/xingbook/park/activity/HeadImageAct;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    invoke-static {v1}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object v1

    invoke-virtual {v2, v1}, Landroid/content/ContentResolver;->openInputStream(Landroid/net/Uri;)Ljava/io/InputStream;

    move-result-object v1

    invoke-static {v1}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;)Landroid/graphics/Bitmap;
    :try_end_0
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    :goto_1
    if-eqz v0, :cond_0

    invoke-direct {p0, v4}, Lcom/xingbook/park/activity/HeadImageAct;->a(Z)V

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->d:Landroid/widget/ImageView;

    const/high16 v2, 0x42a4

    const/16 v3, 0xa4

    invoke-static {v0, v2, v3, v4}, Lcom/xingbook/c/k;->a(Landroid/graphics/Bitmap;FIZ)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    goto :goto_0

    :catch_0
    move-exception v1

    goto :goto_1
.end method

.method public onClick(Landroid/view/View;)V
    .locals 3

    const/4 v1, 0x0

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    return-void

    :pswitch_0
    iget-boolean v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->a:Z

    if-eqz v0, :cond_1

    new-instance v0, Landroid/app/ProgressDialog;

    invoke-direct {v0, p0}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, v1}, Landroid/app/ProgressDialog;->setCancelable(Z)V

    const-string v1, "\u6b63\u5728\u5e94\u7528\u5934\u50cf..."

    invoke-virtual {v0, v1}, Landroid/app/ProgressDialog;->setMessage(Ljava/lang/CharSequence;)V

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->isShowing()Z

    move-result v1

    if-nez v1, :cond_0

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->show()V

    :cond_0
    sget-object v1, Lcom/xingbook/c/o;->h:Ljava/util/concurrent/ExecutorService;

    new-instance v2, Lcom/xingbook/park/activity/x;

    invoke-direct {v2, p0, v0}, Lcom/xingbook/park/activity/x;-><init>(Lcom/xingbook/park/activity/HeadImageAct;Landroid/app/ProgressDialog;)V

    invoke-interface {v1, v2}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V

    goto :goto_0

    :cond_1
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.GET_CONTENT"

    const/4 v2, 0x0

    invoke-direct {v0, v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    sget-object v1, Landroid/provider/MediaStore$Images$Media;->EXTERNAL_CONTENT_URI:Landroid/net/Uri;

    const-string v2, "image/*"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;

    const/4 v1, 0x1

    invoke-virtual {p0, v0, v1}, Lcom/xingbook/park/activity/HeadImageAct;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_0

    :pswitch_1
    iget-boolean v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->a:Z

    if-eqz v0, :cond_2

    invoke-virtual {p0, v1}, Lcom/xingbook/park/activity/HeadImageAct;->setResult(I)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/HeadImageAct;->finish()V

    goto :goto_0

    :cond_2
    new-instance v0, Ljava/io/File;

    new-instance v1, Ljava/lang/StringBuilder;

    sget-object v2, Lcom/xingbook/c/c;->s:Ljava/lang/String;

    invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, "m.jpg"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_3

    invoke-virtual {v0}, Ljava/io/File;->delete()Z

    :cond_3
    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.media.action.IMAGE_CAPTURE"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    const-string v2, "output"

    invoke-static {v0}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object v0

    invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    const/4 v0, 0x2

    invoke-virtual {p0, v1, v0}, Lcom/xingbook/park/activity/HeadImageAct;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_0

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 14

    invoke-super {p0, p1}, Lcom/xingbook/park/activity/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/HeadImageAct;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "child"

    const/4 v2, 0x1

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v0

    iput-boolean v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->e:Z

    sget-object v1, Lcom/xingbook/c/n;->e:Lcom/xingbook/b/a;

    new-instance v6, Lcom/xingbook/ui/XbLayout;

    invoke-direct {v6, p0}, Lcom/xingbook/ui/XbLayout;-><init>(Landroid/content/Context;)V

    const v0, -0xa0a0b

    invoke-virtual {v6, v0}, Lcom/xingbook/ui/XbLayout;->setBackgroundColor(I)V

    new-instance v0, Lcom/xingbook/ui/t;

    const/4 v2, 0x0

    invoke-direct {v0, p0, v2}, Lcom/xingbook/ui/t;-><init>(Landroid/app/Activity;Lcom/xingbook/ui/x;)V

    const-string v2, "\u8bbe\u7f6e\u5934\u50cf"

    iput-object v2, v0, Lcom/xingbook/ui/t;->c:Ljava/lang/String;

    const v2, -0xe64c12

    iput v2, v0, Lcom/xingbook/ui/t;->h:I

    const/4 v2, 0x0

    const/4 v3, 0x0

    invoke-static {p0}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v4

    sget v5, Lcom/xingbook/ui/t;->b:I

    invoke-virtual {v0, v2, v3, v4, v5}, Lcom/xingbook/ui/t;->layout(IIII)V

    invoke-virtual {v6, v0}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    invoke-static {p0}, Lcom/xingbook/c/n;->f(Landroid/app/Activity;)F

    move-result v7

    const/high16 v0, 0x42c8

    mul-float/2addr v0, v7

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v8

    const/high16 v0, 0x41a0

    mul-float/2addr v0, v7

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v9

    const/high16 v0, 0x41a0

    mul-float/2addr v0, v7

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v10

    sget v0, Lcom/xingbook/ui/t;->b:I

    add-int v11, v0, v10

    invoke-static {p0}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v0

    sub-int v12, v0, v9

    const/high16 v0, 0x41a0

    mul-float/2addr v0, v7

    invoke-static {v0}, Ljava/lang/Math;->round(F)I

    move-result v13

    new-instance v0, Lcom/xingbook/ui/ad;

    invoke-direct {v0, p0}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    iget-boolean v3, p0, Lcom/xingbook/park/activity/HeadImageAct;->e:Z

    if-eqz v3, :cond_1

    const-string v3, ""

    iget-object v4, v1, Lcom/xingbook/b/a;->e:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    const-string v1, "\u661f\u5b9d"

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    :goto_0
    const-string v1, "\u7684\u5934\u50cf"

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    const/high16 v1, 0x4238

    mul-float/2addr v1, v7

    iput v1, v0, Lcom/xingbook/ui/ad;->c:F

    const v1, -0x99999a

    iput v1, v0, Lcom/xingbook/ui/ad;->b:I

    const/16 v1, 0x13

    iput v1, v0, Lcom/xingbook/ui/ad;->d:I

    const v1, -0x777778

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x1

    invoke-virtual/range {v0 .. v5}, Lcom/xingbook/ui/ad;->a(IIIII)V

    iput v13, v0, Lcom/xingbook/ui/ad;->l:I

    add-int v1, v11, v8

    invoke-virtual {v0, v9, v11, v12, v1}, Lcom/xingbook/ui/ad;->layout(IIII)V

    invoke-virtual {v6, v0}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    add-int/2addr v1, v10

    iget-boolean v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->e:Z

    if-eqz v0, :cond_2

    sget-object v0, Lcom/xingbook/c/n;->e:Lcom/xingbook/b/a;

    invoke-virtual {p0}, Lcom/xingbook/park/activity/HeadImageAct;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/xingbook/b/a;->b(Landroid/content/res/Resources;)Landroid/graphics/Bitmap;

    move-result-object v0

    :goto_1
    new-instance v2, Landroid/widget/ImageView;

    invoke-direct {v2, p0}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lcom/xingbook/park/activity/HeadImageAct;->d:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/xingbook/park/activity/HeadImageAct;->d:Landroid/widget/ImageView;

    invoke-virtual {v2, v0}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    iget-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->d:Landroid/widget/ImageView;

    sget-object v2, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    const/high16 v0, 0x4324

    mul-float/2addr v0, v7

    float-to-int v0, v0

    iget-object v2, p0, Lcom/xingbook/park/activity/HeadImageAct;->d:Landroid/widget/ImageView;

    invoke-static {p0}, Lcom/xingbook/c/n;->c(Landroid/app/Activity;)I

    move-result v3

    sub-int/2addr v3, v0

    div-int/lit8 v3, v3, 0x2

    add-int v4, v3, v0

    add-int/2addr v0, v1

    invoke-virtual {v2, v3, v1, v4, v0}, Landroid/widget/ImageView;->layout(IIII)V

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->d:Landroid/widget/ImageView;

    invoke-virtual {v6, v1}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    mul-int/lit8 v1, v10, 0x2

    add-int/2addr v0, v1

    new-instance v1, Lcom/xingbook/ui/ad;

    invoke-direct {v1, p0}, Lcom/xingbook/ui/ad;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    const/4 v2, 0x1

    invoke-virtual {v1, v2}, Lcom/xingbook/ui/ad;->setId(I)V

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    invoke-virtual {v1, p0}, Lcom/xingbook/ui/ad;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    const-string v2, "\u4ece\u76f8\u518c\u4e2d\u9009\u62e9\u7167\u7247"

    iput-object v2, v1, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    const/high16 v2, 0x4238

    mul-float/2addr v2, v7

    iput v2, v1, Lcom/xingbook/ui/ad;->c:F

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    const/4 v2, -0x1

    iput v2, v1, Lcom/xingbook/ui/ad;->b:I

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    const v2, -0x932fb9

    iput v2, v1, Lcom/xingbook/ui/ad;->i:I

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    const/high16 v2, 0x4120

    iput v2, v1, Lcom/xingbook/ui/ad;->j:F

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    const/16 v2, 0x11

    iput v2, v1, Lcom/xingbook/ui/ad;->d:I

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    iput v13, v1, Lcom/xingbook/ui/ad;->l:I

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    const v2, -0xff9934

    invoke-virtual {v1, v2}, Lcom/xingbook/ui/ad;->setHilighted(I)V

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    add-int v2, v0, v8

    invoke-virtual {v1, v9, v0, v12, v2}, Lcom/xingbook/ui/ad;->layout(IIII)V

    iget-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    invoke-virtual {v6, v0}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    add-int v0, v2, v10

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->b:Lcom/xingbook/ui/ad;

    invoke-virtual {v1}, Lcom/xingbook/ui/ad;->b()Lcom/xingbook/ui/ad;

    move-result-object v1

    iput-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->c:Lcom/xingbook/ui/ad;

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->c:Lcom/xingbook/ui/ad;

    const/4 v2, 0x2

    invoke-virtual {v1, v2}, Lcom/xingbook/ui/ad;->setId(I)V

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->c:Lcom/xingbook/ui/ad;

    invoke-virtual {v1, p0}, Lcom/xingbook/ui/ad;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->c:Lcom/xingbook/ui/ad;

    const-string v2, "\u62cd\u6444\u7167\u7247"

    iput-object v2, v1, Lcom/xingbook/ui/ad;->a:Ljava/lang/String;

    iget-object v1, p0, Lcom/xingbook/park/activity/HeadImageAct;->c:Lcom/xingbook/ui/ad;

    add-int v2, v0, v8

    invoke-virtual {v1, v9, v0, v12, v2}, Lcom/xingbook/ui/ad;->layout(IIII)V

    iget-object v0, p0, Lcom/xingbook/park/activity/HeadImageAct;->c:Lcom/xingbook/ui/ad;

    invoke-virtual {v6, v0}, Lcom/xingbook/ui/XbLayout;->addView(Landroid/view/View;)V

    invoke-virtual {p0, v6}, Lcom/xingbook/park/activity/HeadImageAct;->setContentView(Landroid/view/View;)V

    return-void

    :cond_0
    iget-object v1, v1, Lcom/xingbook/b/a;->e:Ljava/lang/String;

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto/16 :goto_0

    :cond_1
    const-string v1, "\u6211"

    invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    goto/16 :goto_0

    :cond_2
    sget-object v0, Lcom/xingbook/c/n;->e:Lcom/xingbook/b/a;

    invoke-virtual {p0}, Lcom/xingbook/park/activity/HeadImageAct;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    invoke-virtual {v0, v2}, Lcom/xingbook/b/a;->a(Landroid/content/res/Resources;)Landroid/graphics/Bitmap;

    move-result-object v0

    goto/16 :goto_1
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 2

    invoke-virtual {p2}, Landroid/view/KeyEvent;->getKeyCode()I

    move-result v0

    const/4 v1, 0x4

    if-ne v0, v1, :cond_0

    invoke-virtual {p0}, Lcom/xingbook/park/activity/HeadImageAct;->finish()V

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method protected onPause()V
    .locals 1

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onPause()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onPause(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/HeadImageAct;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->b(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->a(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 1

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onResume()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onResume(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/park/activity/HeadImageAct;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->a(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->b(Landroid/content/Context;)V

    return-void
.end method
